package com.blb.community.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.community.entity.SysOperLog;
import com.blb.community.mapper.SysOperLogMapper;
import com.blb.community.service.ISysOperLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 操作日志记录 服务实现类
 * </p>
 *
 * @author 帅帅
 * @since 2022-07-02
 */
@Service
public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOperLog> implements ISysOperLogService {

    @Autowired
    SysOperLogMapper sysOperLogMapper;
    @Override
    public IPage<SysOperLog> getOperLogPage(Long current, Long size) {
        return sysOperLogMapper.getAllOperLogPage(new Page<>(current,size));
    }

    @Override
    public List<SysOperLog> selectOperLogDetails(Long id) {
        return sysOperLogMapper.selectOperLogDetails(id);
    }

    @Override
    public IPage<SysOperLog> getFuzzyOperLog(Long current,Long size,String title,String operName,String businessType,String status,String beginTime,String endTime) {
        return sysOperLogMapper.getFuzzyOperLog(new Page<>(current,size),title,operName,businessType,status,beginTime,endTime);
    }
}
